debug ?= 0

acml := /opt/acml4.4.0/ifort64_mp
acmllibs := $(wildcard $(acml)/lib/*.a)

fftw := /opt/fftw3
fftwlibs := $(wildcard $(fftw)/lib/*.a)

cuda := /usr/local/cuda
cudalibs := -L$(cuda)/lib64 -lcublas -lcudart -lcufft -lcuda
nvcc := $(cuda)/bin/nvcc
nvccflags := -Xcompiler -fopenmp -arch sm_11

c++ := g++
cppflags := -I./include -I$(acml)/include -I$(fftw)/include -I$(cuda)/include
c++flags := -Wall -fopenmp

ldflags := $(acmllibs) $(fftwlibs) $(cudalibs) -lrt -fopenmp

ld := ld

ifeq ($(debug),1)
  c++flags := $(c++flags) -O0 -g
  nvccflags := $(nvccflags) -O0 -g
else
  c++flags := $(c++flags) -O3
  nvccflags := $(nvccflags) -O3
endif

